package semiProject.models;

public class BookVO {
	// 멤버변수 선언
	private String bkno; // 도서번호 v
	private String name; // 도서명
	private String publisher; // 출판사
	private String writer; // 지은이
	private String genre; // 장르
	private int price; // 가격
	private boolean isRent; // 대여여부 v
	private int regdate; // 등록일 v

	// 생성자
	public BookVO(String name,String publisher,String writer,String genre,int price) { // 외부에서 입력을 받기 위해서..
		this.name = name;
		this.publisher = publisher;
		this.writer = writer;
		this.genre = genre;
		this.price = price;
	}

	// setter, getter
	public String getBkno() {
		return bkno;
	}

	public void setBkno(String bkno) {
		this.bkno = bkno;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPublisher() {
		return publisher;
	}

	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}

	public String getWriter() {
		return writer;
	}

	public void setWriter(String writer) {
		this.writer = writer;
	}

	public String getGenre() {
		return genre;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public boolean isRent() {
		return isRent;
	}

	public void setRent(boolean isRent) {
		this.isRent = isRent;
	}

	public int getRegdate() {
		return regdate;
	}

	public void setRegdate(int regdate) {
		this.regdate = regdate;
	}
	
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();	
		sb.append(bkno).append("/")
		.append(name).append("/")
		.append(publisher).append("/")
		.append(writer).append("/")
		.append(genre).append("/")
		.append(price).append("/")
		.append(isRent).append("/")
		.append(regdate).append("/");
		
		//return sb; // 이렇게 하면 주소값이 나온다..
		return sb.toString();


		/*String result = "";
		result += bkno+"/"+name+"/"+publisher+"/"+writer+"/"+genre+"/"+price+"/"+isRent+"/"+regdate;
		return result;*/
	}
}
